package com.tencent.mm.opensdk.modelmsg;

import android.os.Bundle;
import android.util.Log;
import com.tencent.mm.opensdk.modelbase.BaseReq;
import com.tencent.mm.opensdk.modelbase.BaseResp;
import com.tencent.mm.opensdk.modelmsg.WXMediaMessage.Builder;

public final class GetMessageFromWX {
    public static class Req extends BaseReq {
        public String country;
        public String lang;
        public String username;

        public Req() {

        }

        public Req(Bundle arg1) {

            this.fromBundle(arg1);
        }

        public boolean checkArgs() {
            return true;
        }

        public void fromBundle(Bundle arg2) {
            super.fromBundle(arg2);
            this.lang = arg2.getString("_wxapi_getmessage_req_lang");
            this.country = arg2.getString("_wxapi_getmessage_req_country");
        }

        public int getType() {
            return 3;
        }

        public void toBundle(Bundle arg3) {
            super.toBundle(arg3);
            arg3.putString("_wxapi_getmessage_req_lang", this.lang);
            arg3.putString("_wxapi_getmessage_req_country", this.country);
        }
    }

    public class Resp extends BaseResp {
        private static final String TAG = "MicroMsg.SDK.GetMessageFromWX.Resp";
        public WXMediaMessage message;

        public Resp() {

        }

        public Resp(Bundle arg1) {

            this.fromBundle(arg1);
        }

        public boolean checkArgs() {
            boolean v0;
            if(this.message == null) {
                Log.e("MicroMsg.SDK.GetMessageFromWX.Resp", "checkArgs fail, message is null");
                v0 = false;
            }
            else {
                v0 = this.message.checkArgs();
            }

            return v0;
        }

        public void fromBundle(Bundle arg2) {
            super.fromBundle(arg2);
            this.message = Builder.fromBundle(arg2);
        }

        public int getType() {
            return 3;
        }

        public void toBundle(Bundle arg2) {
            super.toBundle(arg2);
            arg2.putAll(Builder.toBundle(this.message));
        }
    }

    private GetMessageFromWX() {

    }
}

